﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace User.API.Models
{
    public class AjaxResult
    {
        public AjaxResult()
        {}
        public AjaxResult(DoResult result, string promptMsg)
        {
            Result = result;
            PromptMsg = promptMsg;
        }
        public AjaxResult(DoResult result,string promptMsg,object data)
            :this(result, promptMsg)
        {
            RetValue = data;
        }
        public AjaxResult(DoResult result, string promptMsg, string debugMsg)
           : this(result, promptMsg)
        {
            DebugMsg = debugMsg;
        }
        public DoResult Result { get; set; }
        public string PromptMsg { get; set; }
        public string DebugMsg { get; set; }
        public object RetValue { get; set; }
    }

    public enum DoResult
    {
        Success=0,
        Failed=1,
        OverTime=2,
        Other=255
    }
}
